package online.longzipeng.pojo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.util.Date;

/**
 * @author lzp
 * @Date:2022/12/9
 * @description:
 */
@Data
public class CommentVo {

	/**
	 * 自增主键
	 */
	@JsonSerialize(using = ToStringSerializer.class)
	private Long id;

	/**
	 * 默认设置为当前时间戳
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date createTime;

	/**
	 * 内容
	 */
	private String content;

	/**
	 * 评论对应对象的id
	 */
	private Integer objId;

	/**
	 * 回复的目标用户
	 */
	private UserVo toUser;

	/**
	 * 评论创建者
	 */
	private UserVo author;

}
